-- CALC_DORAEMON_SOURCE_BONUS

-- 未来猫未知空间资源奖励
-- @param user      玩家对象
return function(user)
    local dungeonId = DungeonM.getDungeonId();
    if dungeonId == nil then
        dungeonId = user.dbase:query("currentDungeon");
    end
    if DungeonAreaM.query(dungeonId, "type") == "child" then
        dungeonId = DungeonAreaM.query(dungeonId, "parent_id")
    end

    local giftMap = {  [1]=7222, [2]=7223, [3]=7224, [4]=7225, [5]=7226, [6]=7227, [7]=7228, [8]=7229, [9]=7230, [10]=7231,
                       [1001]=7232, [1002]=7233, [1003]=7234, [1004]=7235, [1005]=7236, [1006]=7237 };

    -- 关卡对应的银行礼盒奖励
    local propertyId = giftMap[dungeonId];
    if propertyId then
        local propertyArgs = PropertyM.query(propertyId, "args");
        local bonus = propertyArgs["bonus"];
        if type(bonus) == 'table' then
            return bonus;
        elseif type(bonus) == 'string' and
            string.startWith(bonus, "formula_") then
            local prefix = "formula_";
            local formulaName = string.sub(bonus, string.len(prefix) + 1);

            return FormulaM.invoke(formulaName, ME.user);
        end
    end

    -- 默认奖励300探索点
    return { 2, "search_point", 300};
end